package com.otojob.service;

import com.otojob.dto.PageDto;
import com.otojob.entity.JobList;
import com.baomidou.mybatisplus.extension.service.IService;
import com.otojob.utils.Results;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author TingFeng
 * @since 2022-03-28
 */
@CacheConfig(cacheNames = "JobListService")
public interface JobListService extends IService<JobList> {
    /**
     * 工作分类
     * @return
     */
    @Cacheable(value = "jobList")
    Results findAllJobList(PageDto pageDto);

    /**
     * 添加职位列表
     * @param job
     * @return
     */
    @CacheEvict(value = "jobList")
    Results addJobList(JobList job);

    /**
     * 查找职位分类
     * @param pageDto
     * @return
     */
    Results findJobList(PageDto pageDto,String condition);
}
